//node 09-es6-module.mjs
//curl http://localhost:8080/

import http, { createServer } from 'http';
import chalk from 'chalk';

const Server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });

  console.log(chalk.greenBright(`${req.method} ${req.url} ${req.httpVersion}`));
}).listen(8080, () => {
  console.log('Server Runing!');
})